<!-- $Id: adminEdit.html 10 2011-02-06 08:35:48Z nicholasinlove1986@gmail.com $ -->
<include file="Public:pageheader"/>
<load href="__PUBLIC__/Js/validator.js" />
<script language="javascript">
/**
* 检查表单输入的数据
*/
function validate()
{
	validator = new Validator("theForm");
	
	/* *
	* 检查用户密码
	* 密码必须同时包含字母及数字且长度不能小于6
	* @param :  controlId   表单元素的ID
	* @param :  msg         错误提示信息
	*/
	validator.password = function (controlId, msg)
	{
		var obj = document.forms[this.formName].elements[controlId];
		obj.value = Utils.trim(obj.value);
		if (!(obj.value.length >= 6 && /\d+/.test(obj.value) && /[a-zA-Z]+/.test(obj.value)))
		{
		  this.addErrorMsg(msg);
		}	
	}  
	
	validator.required("user_nickname", "{$Think.lang.js_user_nickname}");
	validator.required("user_email", "{$Think.lang.js_user_email}");
	validator.isEmail("user_email", "{$Think.lang.js_user_email_}",1);
	validator.password("user_password", "{$Think.lang.js_user_password}");
	validator.eqaul("user_password", "pwd_confirm", "{$Think.lang.js_pwd_confirm}");
	return validator.passed();
}
</script>
<div class="main-div">
<form name="theForm" method="post" action="__URL__/actionEdit"  onsubmit="return validate()">
<table width="100%">
  <tr>
    <td width="50%" class="label">{$Think.lang.user_name}</td>
    <td width="50%">{$vo.user_name}</td>
  </tr>
  <tr>
    <td class="label">{$Think.lang.user_nickname}</td>
    <td>
      <input type="text" name="user_nickname" maxlength="50" value="{$vo.user_nickname}" size="34"/><span class="require-field">*</span></td>
  </tr>
  <tr>
    <td class="label">{$Think.lang.user_email}</td>
    <td>
      <input type="text" name="user_email" value="{$vo.user_email}" size="34" /><span class="require-field">*</span></td>
  </tr>
   <tr>
    <td class="label">{$Think.lang.user_password}</td>
    <td>
      <input type="password" name="user_password" maxlength="32" size="34" /><span class="require-field">*</span></td>
  </tr>
  <tr>
    <td class="label">{$Think.lang.pwd_confirm}</td>
    <td>
      <input type="password" name="pwd_confirm" maxlength="32" size="34" /><span class="require-field">*</span></td>
  </tr>
  <tr>
    <td class="label">{$Think.lang.user_status}</td>
    <td><select name="user_status">
	<option <eq name="vo.user_status" value="1" >selected</eq> value="1">{$Think.lang.user_status_on}</option>
	<option <eq name="vo.user_status" value="0" >selected</eq> value="0">{$Think.lang.user_status_un}</option>
	</select><span class="require-field">*</span></td>
  </tr>
           <tr>
    <td colspan="2" align="center">
      <input type="submit" value=" {$Think.lang.submit} " class="button" />&nbsp;&nbsp;&nbsp;
      <input type="reset" value=" {$Think.lang.reset} " class="button" /><input type="hidden" name="user_id" value="{$vo.user_id}"></td>
  </tr>
</table>
</form>
</div>
<include file="Public:pagefooter"/> 